#!/usr/bin/env python

import sys, os, time
from numpy import *
from numpy.linalg import svd

nargs=len(sys.argv)

if nargs<3:
   print 'Usage: '+sys.argv[0]+' nrows ncols'
   sys.exit(-1)

nrows,ncols=map(int,sys.argv[1:])

mm=randn(nrows,ncols)

print 'Processing SVD of a %d x %d matrix ... ' % (nrows, ncols)
t1 = time.time()
bb=svd(mm)
t2 = time.time()
print 'For a %d x %d matrix it took %0.3f sec' % (nrows, ncols, t2-t1)

